//
//  HomeShareGoodsCollectionViewCell.m
//  share_business
//
//  Created by 吴于凌 on 2017/9/2.
//  Copyright © 2017年 wyl. All rights reserved.
//

#import "HomeShareGoodsCollectionViewCell.h"

@interface HomeShareGoodsCollectionViewCell ()

//@property (nonatomic,strong)UIImageView * youLabel;
@property (nonatomic,strong)UILabel * titleLabel;
@property (nonatomic,strong)UILabel * tipLabel;
@property (nonatomic,strong)UILabel * detailLabel;

@property (nonatomic,strong)UIButton *shareButton ;
@property (nonatomic,strong)UIImageView *imageView ;
@end

@implementation HomeShareGoodsCollectionViewCell


-(void)setUpView {
    self.backgroundColor = [UIColor whiteColor];
//    _youLabel = [BSWidget commonImageViewWithFrame:CGRectMake(0, 0, 25, 25)  image:ImageNamed(@"home_you")];
    UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 10, self.width, self.height - 20)];
    bgView.backgroundColor = [UIColor colorWithHexString:@"#efefef"];
    
    _titleLabel = [BSWidget commonLableWithFrame:CGRectMake(10 ,10, 65, 25) text:@"专题标题" color:[UIColor blackColor] font:15];
    _titleLabel.textColor = RGBA(51, 51, 51, 1);
    
    _tipLabel = [BSWidget commonLableWithFrame:CGRectMake(_titleLabel.maxX + 5,0, 60, 20) text:@"限时优惠" color:[UIColor whiteColor] font:13.5];
    _tipLabel.textAlignment =NSTextAlignmentCenter ;
    _tipLabel.centerY = _titleLabel.centerY ;
    _tipLabel.backgroundColor = [UIColor orangeColor];
    
    _shareButton = [BSWidget commonButtonWithFrame:CGRectMake(self.width - 70, 0, 60, 30) title:nil color:nil fontSize:0 target:self action:@selector(share)];
    _shareButton.centerY = _titleLabel.centerY ;
    [_shareButton setImage:ImageNamed(@"home_share") forState:UIControlStateNormal];
    
    _detailLabel = [BSWidget commonLableWithFrame:CGRectMake(10,_titleLabel.maxY + 5, self.width-20, 50) text:@"详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情详情" color:[UIColor blackColor] font:13.5];
    _detailLabel.textColor = RGBA(51, 51, 51, 1);
    _detailLabel.numberOfLines = 2 ;
    
    _imageView = [BSWidget commonImageViewWithFrame:CGRectMake(0,_detailLabel.maxY+5, self.width, self.height - _detailLabel.maxY - 35)  image:ImageNamed(@"")];
    _imageView.contentMode = UIViewContentModeScaleToFill ;
    [BSCommon setImageWithUrl:_imageView url:@"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1505063311363&di=86a9c83e3c16b8c9cf9f5c5bc78de377&imgtype=0&src=http%3A%2F%2Fscimg.jb51.net%2Fallimg%2F160624%2F13-160624153R5311.jpg"];
//    [self.contentView addSubview:_youLabel];
    [bgView addSubview:_titleLabel];
    [bgView addSubview:_tipLabel];
    [bgView addSubview:_detailLabel];
    [bgView addSubview:_shareButton];
    [bgView addSubview:_imageView];
    [self.contentView addSubview:bgView];
}
-(void)share{
    
}

@end
